﻿/*
 * Author: Mattan360
 * Contributors:
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Irrlicht.Net.Core
{
    public class Dimension2D
    {
        internal uint width;
        internal uint height;

        public Dimension2D(uint width, uint height)
        {
            this.width = width;
            this.height = height;
        }

        public uint Width
        {
            get
            {
                return width;
            }

            set
            {
                width = value;
            }
        }

        public uint Height
        {
            get
            {
                return height;
            }

            set
            {
                height = value;
            }
        }

        public static Dimension2D operator +(Dimension2D dim1, Dimension2D dim2)
        {
            return new Dimension2D((uint)(dim1.width + dim2.width), (uint)(dim1.height + dim2.height));
        }

        public static Dimension2D operator -(Dimension2D dim1, Dimension2D dim2)
        {
            return new Dimension2D((uint)(dim1.width - dim2.width), (uint)(dim1.height + dim2.height));
        }

        public static Dimension2D operator *(Dimension2D dim1, Dimension2D dim2)
        {
            return new Dimension2D((uint)(dim1.width * dim2.width), (uint)(dim1.height * dim2.height));
        }

        public static Dimension2D operator /(Dimension2D dim1, Dimension2D dim2)
        {
            return new Dimension2D((uint)(dim1.width / dim2.width), (uint)(dim1.height / dim2.height));
        }
    }
}
